package com.op.parcel.manage.modules.sys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.op.parcel.manage.modules.sys.entity.User;
import com.op.parcel.manage.modules.sys.vo.UserVO;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

/**
 * 服务类
 *
 * @author xuan
 * @since 2019-01-07
 */
public interface IUserService extends IService<User> {
	@Cacheable(value="user",key="#user.getUsername()")
	UserVO getUserInfo(User user);

	@CacheEvict(value="user",key="#user.getUsername()")
	void updatePwd(User user);

	void saveOrUpdateUser(User user, List<String> roleIds);
}
